package InnerClass;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class InnerClassExercise01 {
    public static void main(String[] args) {
        //当作实参直接传递，简洁高效
        f1(new InnerClassExercise01A() {
            public void show() {
                System.out.println("这是一幅画");
            }
        });
        InnerClassExercise01 a = new InnerClassExercise01();
        f1(new InnerClassExercise01Picture());
    }
    /**
     * 静态方法,形参是接口类型
     */
    public static void f1(InnerClassExercise01A il){
        il.show();
    }
}
/**
 * 接口
 */
interface InnerClassExercise01A {
    void show();
}
/**
 * 类->实现InnerClassExercise01A
 */
class InnerClassExercise01Picture implements InnerClassExercise01A{
    public void show() {
        System.out.println("类实现InnerClassExercise01A");
    }
}
